Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Using NO-UNDO variables and temp-tables
When variables without the
NO-UNDOqualifier are updated, a before-image of the previous value is generated in what amounts to a separate record buffer for allNO-UNDOvariables. This is useful when you want the original value restored when youUNDOa block or transaction. When you do not need this capability, the before-image generation is needless overhead. Use ofNO-UNDOalso causes the Progress local before-image (.lbi) file, which is maintained for each user connected to a database, to be smaller. As noted in Chapter 2, "Using Basic 4GL Constructs," when this guide first introduced theDEFINE VARIABLEstatement, it is unusual for variables to require theUNDOsupport that they receive by default. So, it is a good practice to make theNO-UNDOkeyword a standard part of your variable definitions unless a particular variable really needs the support.With temp-tables the situation is not always as clear. There might be cases where you are adding records to a temp-table or changing records in a temp-table within a transaction, and you want to be able to undo those changes. If this is not the case, however, you’ll benefit significantly from defining the temp-table with the same
NO-UNDOqualifier as for variables. This spares you from having Progress create a before-image of every temp-table change made within a transaction.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |